<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	set_html('title',$basic['title']?'课程列表-'.$basic['title']:'课程列表');
	$return['sharedata']=array(
		'title'=>$basic['share_title'],
		'desc'=>$basic['share_desc'],
		'link'=>custom_url('jy_onlineedu/news/',true),
		'imgUrl'=>ATTACHMENT_URL.$basic['share_image'],
	);
	$return['params']=array('isnews'=>1,'groupid'=>0,'keyword'=>'');
	if($_RQ['keyword']){
		$return['params']['keyword']=$_RQ['keyword'];
	}
	$return['groups']=pdo_getall('jy_onlineedu_video_group',array('uniacid'=>$_SESSION['uniacid'],'status'=>'1','pid'=>0),'','','paixu desc');
	foreach($return['groups'] as &$item){
		$item['childs']=pdo_getall('jy_onlineedu_video_group',array('uniacid'=>$_SESSION['uniacid'],'status'=>1,'pid'=>$item['id']),array(),'','paixu desc');
	}
	$return['childs']=$return['groups'][0]['childs'];
	$return['nowkey']=0;
	$return['nowchilds']=$return['groups'][0]['childs'];
	$return['nowchildid']=$return['groups'][0]['childs'][0]['id'];
	$return['params']['pcate']=$return['groups'][0]['id'];
	$return['params']['ccate']=$return['groups'][0]['childs'][0]['id'];
	$return['params']['groupid']=$return['groups'][0]['id'];
	if($return['pluginset']['is_newlist']){
		$return['htmls']=$this->template_url('newlist');
	}
	exi($return);
}